<!--
 * @Author: your name
 * @Date: 2019-10-22 09:06:18
 * @LastEditTime: 2019-10-31 10:45:27
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: /e:\yjp\my_test\vue_plugins\src\views\Websocket.vue
 -->
<template>
<div class="container">
    <van-nav-bar title="$bus传值" left-arrow fixed :border="false"
      @click-left='$router.push("/")'/>
      
    <van-cell-group>
        <van-field
            v-model="username"
            label="用户名"
            placeholder="请输入用户名"
        />
        <van-field
            v-model="mobile"
            label="手机号"
            placeholder="请输入手机号"
        />
        <van-cell title="查看/设置用户名" value="" is-link to="/busone"/>
        <van-cell title="查看/设置手机号" value="" is-link to="/bustwo"/>
    </van-cell-group>
    
</div>
</template>
<script>
import { log } from 'util';
export default {
    name:"BUS",
    data(){
        return{
            username:'',
            mobile:''
        }
    },
    created(){
        this.$bus.$on("send",data=>{
            this.username = data.username ;
            this.mobile = data.mobile ;
        })
    },
    mounted(){
        console.log("this.$root",this.$root)
    },
    methods: {
        
    },
    destroyed () {
        this.$bus.$emit("send",this);
    }
}
</script>

<style lang="less" scoped>
</style>